/**
 * 
 */
package com.agenda.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.*;
import org.springframework.transaction.annotation.Transactional;

import com.agenda.dao.ContactDAO;
import com.agenda.form.Contact;

/**
 * @author roberto
 *
 */
@Service
public class ContactServiceImpl implements ContactService {
	 @Autowired
	 private ContactDAO contactDAO;
	/* (non-Javadoc)
	 * @see com.agenda.service.ContactService#addContact(com.agenda.form.Contact)
	 */
	@Override
	@Transactional
	public void addContact(Contact contact) {
		contactDAO.addContact(contact);
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.agenda.service.ContactService#listContact()
	 */
	@Override
	@Transactional
	public List<Contact> listContact() {
		// TODO Auto-generated method stub
		
		return contactDAO.listContact();
	}

	/* (non-Javadoc)
	 * @see com.agenda.service.ContactService#removeContact(java.lang.Integer)
	 */
	@Override
	@Transactional
	public void removeContact(Integer id) {
		// TODO Auto-generated method stub
		contactDAO.removeContact(id);
	}

}
